package jdmx.library.helpers;

public class TypeHelper {

	public static String getClassName(Class<?> c) {
		String className = c.getName();
		if (className.lastIndexOf('.') > 0) {
			className = className.substring(className.lastIndexOf('.')+1);
		}
		return className;
	}
	
	public static String getObjectClassName(Object o) {
		return getClassName(o.getClass());
	}

	public static String getPackageName(Class<?> c) {
		return c.getPackage().getName();
	}
	
	public static String getObjectPackageName(Object o) {
		return getPackageName(o.getClass());
	}
}
